package com.mall.pay.convertor;


import com.mall.pay.dal.entitys.Payment;
import com.mall.pay.dto.PayDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(componentModel = "spring")
public interface PayConvertor {


    @Mappings(
            {
                    @Mapping(source = "id",target = "id"),
                    @Mapping(source = "orderId",target = "orderId"),
                    @Mapping(source = "productName",target = "productName"),

            }
    )
    PayDTO paymentConvert2DTO(Payment payment);
}
